<template>
	<div >
		<van-row>
		  <van-col span="3"><router-link to="/"><van-icon name="arrow-left" size="30"/> </router-link> </van-col>
		  
		  <van-col span="18">挂号就诊</van-col>
		  
		  <van-col span="3"><router-link to="/m2"><van-icon name="share-o" size="30"/> </router-link></van-col>
		</van-row>
		
		<van-row>
			<van-col span="24">
				<van-search
				  v-model="value"
				  shape="round"
				  background="#21ADB4"
				  placeholder="搜索医院、医生、科室、疾病和症状"
				/>
			</van-col>
		</van-row>
		
		<div style="margin-top: 0.625rem; " >
			<van-row>
				<van-col span="5"><van-button round type="primary" color="#21ADB4">找医院</van-button></van-col>
				<van-col span="13"></van-col>
				<van-col span="6"> <router-link to="/ghall"> 全部科室<van-icon name="arrow" /></router-link> </van-col>
			</van-row>
			
			  <van-grid column-num="5" border="false">
			    <van-grid-item  icon="http://xphdata.oss-cn-beijing.aliyuncs.com/c06fedef0a074af9b7bc647fe3fda6fe_%E5%A6%87%E4%BA%A7%E7%A7%91.png?Expires=1666791202&OSSAccessKeyId=LTAI5t8QA19CRR2V15oHyHW8&Signature=33%2FE6KTzxwUVerlifYS2Htihi08%3D" to="/serch1?kName=妇产科" text="妇产科" />
			    <van-grid-item icon="http://xphdata.oss-cn-beijing.aliyuncs.com/ea18895bef25434a850aeddb0e7384e6_%E7%9A%AE%E8%82%A4%E7%A7%91.png?Expires=1666791346&OSSAccessKeyId=LTAI5t8QA19CRR2V15oHyHW8&Signature=takDxsM32e4fsyM4gC7ZpKopjW4%3D" to="/serch1?kName=皮肤科"  text="皮肤科" />
			    <van-grid-item icon="http://xphdata.oss-cn-beijing.aliyuncs.com/f95c4ccbf39a4683a78156b57db2ccbd_%E4%B8%AD%E5%8C%BB%E7%A7%91.png?Expires=1666791452&OSSAccessKeyId=LTAI5t8QA19CRR2V15oHyHW8&Signature=XKJ%2BElbXJvhRrQT59qgZzHJvE3o%3D" to="/serch1?kName=中医科" text="中医科" />
			    <van-grid-item icon="http://xphdata.oss-cn-beijing.aliyuncs.com/116f452bd61e443eb46c51bbe4919ec3_%E5%84%BF%E7%A7%91.png?Expires=1666791472&OSSAccessKeyId=LTAI5t8QA19CRR2V15oHyHW8&Signature=S6jaMwdCU6NHRuURMpdz2etNiOI%3D" to="/serch1?kName=儿科" text="儿科" />
			    <van-grid-item icon="http://xphdata.oss-cn-beijing.aliyuncs.com/8fa7c2010d9d4292a1af76cc98d8d824_%E5%A4%96%E7%A7%91.png?Expires=1666791511&OSSAccessKeyId=LTAI5t8QA19CRR2V15oHyHW8&Signature=4gkl8naJ6Nsp2Kr1bIQQyTJgRdY%3D" to="/serch1?kName=外科" text="外科" />
			  </van-grid>
			  <van-grid column-num="5">
			    <van-grid-item icon="http://xphdata.oss-cn-beijing.aliyuncs.com/cf6aaec30d024d849c34ac7d8aaebadb_%E7%A5%9E%E7%BB%8F%E7%A7%91.png?Expires=1666791557&OSSAccessKeyId=LTAI5t8QA19CRR2V15oHyHW8&Signature=8XhofTj6jxuGU0v0FdoiwzaXX3o%3D" to="/serch1?kName=神经科" text="神经科" />
			    <van-grid-item icon="http://xphdata.oss-cn-beijing.aliyuncs.com/07540ca9465f44119201aa7a45d00e10_%E8%82%A0%E8%83%83%E7%A7%91.png?Expires=1666791776&OSSAccessKeyId=LTAI5t8QA19CRR2V15oHyHW8&Signature=uOCZeie8e7kdlmSrQGdgRRjVxuQ%3D" to="/serch1?kName=肠胃科" text="肠胃科" />
			    <van-grid-item icon="http://xphdata.oss-cn-beijing.aliyuncs.com/37a6387ed1704d86ad3facfdf4ff6225_%E9%AA%A8%E7%A7%91.png?Expires=1666791685&OSSAccessKeyId=LTAI5t8QA19CRR2V15oHyHW8&Signature=8yrAXmpDIGXrNjcZio%2F1n%2Fbdkbc%3D" to="/serch1?kName=骨科" text="骨科" />
			    <van-grid-item icon="http://xphdata.oss-cn-beijing.aliyuncs.com/b3df4dac3d054b56adde4043cd6f94bd_%E5%91%BC%E5%90%B8%E7%A7%91.png?Expires=1666791804&OSSAccessKeyId=LTAI5t8QA19CRR2V15oHyHW8&Signature=bpRghIIFHeH8K3W%2FK5XTwKGnCmc%3D" to="/serch1?kName=呼吸科" text="呼吸科" />
			    <van-grid-item icon="http://xphdata.oss-cn-beijing.aliyuncs.com/070021d050754a9a98f943bc1c96e45d_%E8%A1%80%E6%B6%B2%E7%A7%91.png?Expires=1666791731&OSSAccessKeyId=LTAI5t8QA19CRR2V15oHyHW8&Signature=xvBHRA2a0zsYSCyq8IZg3HRXgqc%3D" to="/serch1?kName=血液科" text="血液科" />
			  </van-grid>
		</div>
		<van-row>
			<van-col span="11">
				<div style="margin-top: 0.625rem;">
					智能找科室
					<br />
					<van-button round type="primary" color="#21ADB4" to="">智能分诊<van-icon name="arrow" /></van-button>
				</div>
			</van-col>	
			<van-col span="2">
			</van-col>	
			<van-col span="11">
				<div style="margin-top: 0.625rem;">
					线上专家
					<br />
					<van-button round type="primary" color="#21ADB4" to="">线上问诊<van-icon name="arrow" /></van-button>
					
				</div>
			</van-col>	
			
		</van-row>
		
		
		
		<div style="margin-top: 0.9375rem;">
			<van-row>
				<van-col span="6">按医院挂号</van-col>
				<van-col span="12"></van-col>
				<van-col span="6" style="color: gainsboro; font-size: 0.8125rem;">全部医院<van-icon name="arrow" /></van-col>
			</van-row>
			<div style="margin-top: 0.625rem;"></div>
			
			<div style="margin-top: 0.625rem;"></div>
			
			
			<van-row v-for="(p,index) in hospitals " :key="index">
				<van-col span="2"></van-col>
				<van-col span="4" style="margin-top: 1.25rem;"> 
				<van-image
				  round
				  width="3rem"
				  height="3rem"
				  :src="p.url"
				  @click="tz(p.name)"
				/>
				
				</van-col>
				<van-col span="2"></van-col>
				<van-col span="16"><h4  @click="tz(p.name)">{{p.name}}</h4>
				<h6  @click="tz(p.name)">国家重点科室：{{p.gz}}</h6> 
			    <h6  @click="tz(p.name)">省级重点科室：{{p.sz}}</h6>
				
				</van-col>
			</van-row>
			
		</div>
		
		<div style="margin-top: 3.125rem;">
			<h6 style="color: darkgray;">没有更多了...</h6>
		</div>
		<div style="margin-top: 6.25rem;"></div>
		
		<div style="margin-bottom: 0px;">
		      <van-sticky>
		        <van-tabbar v-model="active" route>
		          <van-tabbar-item replace to="/guahao"  icon="smile-o">首页</van-tabbar-item>
		          <van-tabbar-item icon="manager-o" to="/ghmy">我的</van-tabbar-item>
		        </van-tabbar>
		      </van-sticky>
		</div>
		
	</div>
</template>

<script>
	
	export default{
		data(){
			return{
				hospitals:[],
				
			}
		},
		created(){
			this.axios.get("rh/query").then((res) => {
				console.log(res.data)
				if(res.data.code==200){
					this.hospitals=res.data.data;
				}else{
					this.$toast({
						message: "亲，网络异常",
						icon: 'close'
					});
				}
			})
		},methods:{
			tz(name){
				console.log(name);
				
				this.$router.push({path:"/hmesge",query:{"name":name}});
				
			}
			
		}
		
		
	}
	
	
</script>

<style>
	#nav{
		padding: 0.3125rem;
	}
	
	h4{
		margin-top: 10px;
		margin-bottom: 1px;
	}
	h6{
		margin-top: 1px;
		margin-bottom: 1px;
		color: dimgray;
	}
</style>
